{template '_header'}
<style type="text/css">
    .table_kf {display: none;}
    .table_kf.active {display: table-row-group;}
</style>
<div class="page-header">
    当前位置：<span class="text-primary">分享发券</span>
</div>
<div class="page-content">
    <div class="page-toolbar">
        <span class=''>
        {ifp 'sale.gift.add'}
        <a class='btn btn-primary btn-sm' href="{php echo webUrl('sale/coupon/shareticket/add',array('type'=>$type))}"><i class='fa fa-plus'></i> 添加活动</a>
        {/if}
    </span>
    </div>
    <ul class="nav nav-arrow-next nav-tabs" id="myTab">
        <li class="active" style="position: relative;">
            <a href="{php echo webUrl('sale/coupon/shareticket')}">分享发券</a>
            <span style="position:absolute;right: 9px;top: -7px;"><img src="../addons/mx_shop/static/images/new.png" alt="" ></span>
        </li>
        <li style="position: relative;">
            <a href="{php echo webUrl('sale/coupon/setticket')}">新人发券</a>
            <span style="position:absolute;right: 9px;top: -7px;"><img src="../addons/mx_shop/static/images/new.png" alt="" ></span>
        </li>
        <li>
            <a href="{php echo webUrl('sale/coupon/sendtask')}">满额送券</a>
        </li>
        <li >
            <a href="{php echo webUrl('sale/coupon/goodssend')}">购物送券</a>
        </li>
        <li >
            <a href="{php echo webUrl('sale/coupon/usesendtask')}">用券送券</a>
        </li>

    </ul>
    <form action="./index.php" method="get" class="form-horizontal form-search" role="form">
        <input type='hidden' id='tab' name='type' value="{$_GPC['type']}"/>
        <input type="hidden" name="c" value="site" />
        <input type="hidden" name="a" value="entry" />
        <input type="hidden" name="m" value="mx_shop" />
        <input type="hidden" name="do" value="web" />
        <input type="hidden" name="r"  value="sale.sendticket.share" />


    </form>
    <form action="" method="post">
        {if count($gifts)>0}
        <table class="table table-hover table-responsive">
            <thead class="navbar-inner">

            <tr>
                <th style="width:60px;text-align:center;">排序</th>
                <th>分享名称</th>
                <th style="width:80px;">发送条件</th>
                <th style="width:80px;">活动状态</th>
                <th  style="width:90px;" >开关状态</th>
                <th style="width:75px;text-align: center;">操作</th>
            </tr>
            </thead>
            <tbody class=" table_kf {if $_GPC['type']=='all' || empty($_GPC['type'])}active{/if}" id="tab_all">{template 'sale/coupon/shareticket/list'}</tbody>
            <tfoot>
                <tr>
                    <td colspan="6" class="text-right">{$pager}</td>
                </tr>
            </tfoot>
        </table>
        {else}
        <div class='panel panel-default'>
            <div class='panel-body' style='text-align: center;padding:30px;'>
                暂时没有任何分享活动!
            </div>
        </div>
        {/if}
    </form>
</div>
{template '_footer'}
